package com.pdsu.graduation_design.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.pdsu.graduation_design.R;

public class PayOrderSelectTimeAdapter extends BaseAdapter {

    private Context context;
    private String [] times;


    public PayOrderSelectTimeAdapter() {
    }

    public PayOrderSelectTimeAdapter(Context context, String[] times) {
        this.context = context;
        this.times = times;
    }

    @Override
    public int getCount() {
        return times.length;
    }

    @Override
    public Object getItem(int position) {
        return times[position];
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        View view = View.inflate(context, R.layout.bottomsheetdialog_selecttime_listitem,null);

        TextView textView=view.findViewById(R.id.pay_order_select_time_textView);

        textView.setText(times[position]);
        return view;
    }
}
